package com.ykht.proj.coupon.Enum;

/**
 * 弹幕 状态枚举类
 */
public enum BarrageStatusEnum {
	//状态 0审核通过 1待审核 2不通过
	AT_WORK(0,"审核通过"),
	TO_START(1,"待审核"),
	BE_OVERDUE(2,"不通过");

	private Integer value;
	private String desc;

	private BarrageStatusEnum(Integer value, String desc) {
		this.value = value;
		this.desc = desc;
	}


	/**
	 * 根据val值获取desc
	 * @param val 1、0
	 * @return
	 */
	public static String getDescByVal(Integer val) {
		BarrageStatusEnum[] values = BarrageStatusEnum.values();
		for (BarrageStatusEnum oe : values) {
			if (oe.getValue().equals(val)) {
				return oe.getDesc();
			}
		}
		return null;
	}

	public Integer getValue() {
		return value;
	}

	public void setValue(Integer value) {
		this.value = value;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}
